package band.wukong.practice.springboot.spring4.basic.event;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.ApplicationListener;
import org.springframework.stereotype.Component;

/**
 * @author wukong(wukonggg@139.com)
 */
@Component
public class SomeListener implements ApplicationListener<SomeEvent> {

    private static final Logger logger = LoggerFactory.getLogger(SomeListener.class);

    @Override
    public void onApplicationEvent(SomeEvent evt) {
        String msg = evt.getMessage();
        logger.info("MESSAGE ACCEPTED: " + msg);
    }
}
